var itemUtil = {
  loadItem: function () { // 加载商品分类
    var roles = { 'data': [
      {
        'iid': 1,
        'title': '图书音响',
        'parentid': null
      },
      {
        'iid': 2,
        'title': '汽车用品',
        'parentid': null
      },
      {
        'iid': 3,
        'title': '电脑办公',
        'parentid': null
      },
      {
        'iid': 4,
        'title': '手机数码',
        'parentid': null
      },
      {
        'iid': 5,
        'title': '家居生活',
        'parentid': null
      }
    ]}
    return roles
  },
  loadSubitem: function (pid) {
    var data = { 'data': [
      {
        'iid': 9,
        'title': '汽车配件',
        'parentid': 2
      },
      {
        'iid': 10,
        'title': '汽车改造',
        'parentid': 2
      }
    ]}
    return data
  }
}
var goodsUtil = {
  uploadPhoto: function () {
    return {
      'data': '98289238923923923.png',
      'token': 'KWFKEW)(09230923893498dsfsad',
      'status': 200,
      'message': null
    }
  },
  uploadVideo: function () {
    return {
      'data': '98289238923923923.mp4',
      'token': 'KWFKEW)(09230923893498dsfsad',
      'status': 200,
      'message': null
    }
  },
  add: function () {
    return {
      'data': 101,
      'token': 'KWFKEW)(09230923893498dsfsad',
      'status': 200,
      'message': null
    }
  },
  edit: function () {
    return {
      'data': 101,
      'token': 'KWFKEW)(09230923893498dsfsad',
      'status': 200,
      'message': null
    }
  },
  get: function () {
    return {
      'data': {
        gid: 1,
        title: 'Java从入门到项目实战',
        price: 99.8,
        iid: 1,
        siid: 9,
        photo: '/static/images/goods.png',
        video: '/static/images/goods.mp4',
        lock: 0, // 商品是否发布
        kill: 0, // 秒杀标记
        content: '贼给力的图书' // 商品内容介绍
      },
      'token': 'KWFKEW)(09230923893498dsfsad',
      'status': 200,
      'message': null
    }
  },
  loadData: function () {
    var data = { 'data': [
      { gid: 1, title: 'Java图书', pubdate: '2020-10-12', price: 79.8, userid: 'muyan', lock: 0, amount: 0, comment: 5, kill: 0 },
      { gid: 2, title: 'Java图书', pubdate: '2020-10-12', price: 79.8, userid: 'muyan', lock: 0, amount: 0, comment: 5, kill: 0 },
      { gid: 3, title: 'Java图书', pubdate: '2020-10-12', price: 79.8, userid: 'muyan', lock: 0, amount: 0, comment: 5, kill: 1 },
      { gid: 4, title: 'Java图书', pubdate: '2020-10-12', price: 79.8, userid: 'muyan', lock: 0, amount: 0, comment: 5, kill: 0 },
      { gid: 5, title: 'Java图书', pubdate: '2020-10-12', price: 79.8, userid: 'muyan', lock: 0, amount: 0, comment: 5, kill: 1 },
      { gid: 6, title: 'Java图书', pubdate: '2020-10-12', price: 79.8, userid: 'muyan', lock: 0, amount: 0, comment: 5, kill: 0 },
      { gid: 7, title: 'Java图书', pubdate: '2020-10-12', price: 79.8, userid: 'muyan', lock: 0, amount: 0, comment: 5, kill: 0 },
      { gid: 8, title: 'Java图书', pubdate: '2020-10-12', price: 79.8, userid: 'muyan', lock: 0, amount: 0, comment: 5, kill: 1 },
      { gid: 9, title: 'Java图书', pubdate: '2020-10-12', price: 79.8, userid: 'muyan', lock: 0, amount: 0, comment: 5, kill: 0 }
    ]}
    return data
  },
  loadComment: function () {
    return {'data': [
      {cid: 1111, gid: 1, content: '牛批的不要不要的', score: 5, pubdate: '2020-08-13 11:11:12', userid: 'muyan'},
      {cid: 1111, gid: 1, content: '牛批的不要不要的', score: 5, pubdate: '2020-08-13 11:11:12', userid: 'muyan'},
      {cid: 1111, gid: 1, content: '牛批的不要不要的', score: 5, pubdate: '2020-08-13 11:11:12', userid: 'muyan'},
      {cid: 1111, gid: 1, content: '牛批的不要不要的', score: 5, pubdate: '2020-08-13 11:11:12', userid: 'muyan'},
      {cid: 1111, gid: 1, content: '牛批的不要不要的', score: 5, pubdate: '2020-08-13 11:11:12', userid: 'muyan'},
      {cid: 1111, gid: 1, content: '牛批的不要不要的', score: 5, pubdate: '2020-08-13 11:11:12', userid: 'muyan'},
      {cid: 1111, gid: 1, content: '牛批的不要不要的', score: 5, pubdate: '2020-08-13 11:11:12', userid: 'muyan'},
      {cid: 1111, gid: 1, content: '牛批的不要不要的', score: 5, pubdate: '2020-08-13 11:11:12', userid: 'muyan'},
      {cid: 1111, gid: 1, content: '牛批的不要不要的', score: 5, pubdate: '2020-08-13 11:11:12', userid: 'muyan'},
      {cid: 1111, gid: 1, content: '牛批的不要不要的', score: 5, pubdate: '2020-08-13 11:11:12', userid: 'muyan'},
      {cid: 1111, gid: 1, content: '牛批的不要不要的', score: 5, pubdate: '2020-08-13 11:11:12', userid: 'muyan'},
      {cid: 1111, gid: 1, content: '牛批的不要不要的', score: 5, pubdate: '2020-08-13 11:11:12', userid: 'muyan'},
      {cid: 1111, gid: 1, content: '牛批的不要不要的', score: 5, pubdate: '2020-08-13 11:11:12', userid: 'muyan'}
    ],
    'token': 'fadsfadfafdsd'}
  },
  removeComment: function () {
    return {
      'data': 101,
      'token': 'KWFKEW)(09230923893498dsfsad',
      'status': 200,
      'message': null
    }
  },
  killAdd: function () {
    return {
      'data': 101,
      'token': 'KWFKEW)(09230923893498dsfsad',
      'status': 200,
      'message': null
    }
  },
  killList: function () {
    return { 'data': [
      { kid: 1001, gid: 1, gtitle: 'Java图书', pubdate: '2020-10-12', price: 79.8, gprice: 68.8, userid: 'muyan', start: '2020-09-19 19:00:00', end: '2020-09-19 22:00:00' },
      { kid: 1002, gid: 1, gtitle: 'Java图书', pubdate: '2020-10-12', price: 79.8, gprice: 68.8, userid: 'muyan', start: '2020-09-19 19:00:00', end: '2020-09-19 22:00:00' },
      { kid: 1003, gid: 1, gtitle: 'Java图书', pubdate: '2020-10-12', price: 79.8, gprice: 68.8, userid: 'muyan', start: '2020-09-19 19:00:00', end: '2020-09-19 22:00:00' },
      { kid: 1004, gid: 1, gtitle: 'Java图书', pubdate: '2020-10-12', price: 79.8, gprice: 68.8, userid: 'muyan', start: '2020-09-19 19:00:00', end: '2020-09-19 22:00:00' },
      { kid: 1005, gid: 1, gtitle: 'Java图书', pubdate: '2020-10-12', price: 79.8, gprice: 68.8, userid: 'muyan', start: '2020-09-19 19:00:00', end: '2020-09-19 22:00:00' },
      { kid: 1006, gid: 1, gtitle: 'Java图书', pubdate: '2020-10-12', price: 79.8, gprice: 68.8, userid: 'muyan', start: '2020-09-19 19:00:00', end: '2020-09-19 22:00:00' },
      { kid: 1007, gid: 1, gtitle: 'Java图书', pubdate: '2020-10-12', price: 79.8, gprice: 68.8, userid: 'muyan', start: '2020-09-19 19:00:00', end: '2020-09-19 22:00:00' },
      { kid: 1008, gid: 1, gtitle: 'Java图书', pubdate: '2020-10-12', price: 79.8, gprice: 68.8, userid: 'muyan', start: '2020-09-19 19:00:00', end: '2020-09-19 22:00:00' },
      { kid: 1009, gid: 1, gtitle: 'Java图书', pubdate: '2020-10-12', price: 79.8, gprice: 68.8, userid: 'muyan', start: '2020-09-19 19:00:00', end: '2020-09-19 22:00:00' }
    ]}
  },
  killRemove: function () {
    return {
      'data': 101,
      'token': 'KWFKEW)(09230923893498dsfsad',
      'status': 200,
      'message': null
    }
  }
}
export default {
  itemMock: itemUtil,
  goodsMock: goodsUtil
}
